reftest-compare: Treat colour channels as undefined if alpha is zero
authorSimon McVittie <smcv@debian.org>
Thu, 2 Sep 2021 21:34:14 +0000 (22:34 +0100)
committerSimon McVittie <smcv@debian.org>
Thu, 2 Sep 2021 21:34:48 +0000 (22:34 +0100)
commit16b9a30655d658a44bf7de316e76481303a408e8
tree3f3a07304cd458dc6dc38a6052b2e32e66ef791d
parent82a184a7b774ca647b06314fbd3702bd7905ff8d
reftest-compare: Treat colour channels as undefined if alpha is zero

If the alpha channel is zero, it doesn't matter what the values of the
red, green and blue channels are: the pixel is still fully transparent.
On most architectures, fully transparent pixels end up all-zeroes
(fully transparent black), matching what's in the reference PNG file;
but on mips*el the blend-difference and blend-normal tests get all-ones
(fully transparent white) and a test failure.

Resolves: https://gitlab.gnome.org/GNOME/gtk/-/issues/4227
Signed-off-by: Simon McVittie <smcv@debian.org>
testsuite/reftests/reftest-compare.c